return function(var, lib, t, i)
	local x_pos = var.x_pos
	local y_pos = var.y_pos
	local max_width = var.max_width
	local max_height = var.max_height

	local padding = t[i].padding or 0
	local radius = t[i].radius or 0

	if mx > x_pos+padding and mx < x_pos+max_width-padding and my > y_pos+padding and my < max_height+y_pos-padding then
		if y_start ~= 0 then
			t[i].y = t[i].y + y_start
			y_start = 0
		end
		if t[i].y >= 0 then t[i].y = 0 end
		--if t[i].y <= -max_height then t[i].y = -max_height end

	end

	if t[i].content ~= nil then
		local canvas = love.graphics.newCanvas(max_width, max_height)
		love.graphics.setCanvas(canvas)
		love.graphics.clear(1,1,1,0)
		my = my - y_pos

		lib.render(t[i].content, x_pos, 0+t[i].y, max_width, max_height) -- 2 arg: y_pos


		my = my + x_pos
		love.graphics.setCanvas()
		love.graphics.setColor(1,1,1)
		love.graphics.draw(canvas, x_pos, y_pos)

	end
end